<template>
  <div class="dashboard-container">
    <div class="welcome-message">
      <h2>欢迎回来，{{ username }}！</h2>
    </div>
  </div>  
</template>

<script setup>
import { ref, onMounted } from 'vue'

const username = ref('')

onMounted(() => {
  username.value = localStorage.getItem('userName') || '访客'
})
</script>

<style scoped>
.dashboard-container {
  padding: 20px;
}

.welcome-message {
  margin-bottom: 30px;
}

.welcome-message h2 {
  font-size: 24px;
  color: #303133;
  font-weight: 500;
  margin: 0;
}
</style> 